package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 学习积分记录，每个月底清零 前端控制器
 * </p>
 *
 * @author 东哥
 * @since 2025-07-06
 */
@Api(tags = "签到记录相关接口")
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController {
    private final ISignRecordService signRecordService;

    /**
     * 1、签到（Day7 - 随堂1）
     * @return
     */
    @PostMapping
    @ApiOperation("签到")
    public SignResultVO sign(){
        return signRecordService.sign();
    }

    /**
     * 2、查询签到记录（Day7 - 随堂2）
     * @return
     */
    @GetMapping
    @ApiOperation("查询签到记录")
    public Byte[] querySignRecords(){
        return signRecordService.querySignRecords();
    }
}
